From 8aae4f14458bf771a696d8d36b87069718447017 Mon Sep 17 00:00:00 2001 From: Christoph Egger Date: Thu, 17 May 2012 14:45:43 +0100 Subject: [PATCH] libxl: fix build on platforms where openpty's parameters are not const. Such as NetBSD. Fixes this build error: libxl_aoutils.c: In function 'libxl__openptys': libxl_aoutils.c:281:13: error: passing argument 4 of 'openpty' discards qualifiers from pointer target type /usr/include/util.h:92:6: note: expected 'struct termios *' but argument is of type 'const struct termios *' libxl_aoutils.c:281:13: error: passing argument 5 of 'openpty' discards qualifiers from pointer target type /usr/include/util.h:92:6: note: expected 'struct winsize *' but argument is of type 'const struct winsize *' Signed-off-by: Christoph Egger Acked-by: Roger Pau Monne Acked-by: Ian Campbell Committed-by: Ian Campbell --- tools/libxl/libxl_aoutils.c | 4 ++-- tools/libxl/libxl_internal.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/libxl/libxl_aoutils.c b/tools/libxl/libxl_aoutils.c index 91e34dea95..ee0df57ff5 100644 --- a/tools/libxl/libxl_aoutils.c +++ b/tools/libxl/libxl_aoutils.c @@ -230,8 +230,8 @@ static void openpty_exited(libxl__egc *egc, libxl__ev_child *child, } int libxl__openptys(libxl__openpty_state *op, - const struct termios *termp, - const struct winsize *winp) { + struct termios *termp, + struct winsize *winp) { /* * This is completely crazy. openpty calls grantpt which the spec * says may fork, and may not be called with a SIGCHLD handler. diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 73b991524e..85da15562e 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -1740,8 +1740,8 @@ struct libxl__openpty_result { }; int libxl__openptys(libxl__openpty_state *op, - const struct termios *termp, - const struct winsize *winp); + struct termios *termp, + struct winsize *winp); /*----- bootloader -----*/ -- 2.30.2